Resource URL: /platform/<<version=3>>/sync/rules/<RULE>

    Overview: This resource applies the standard collection pattern to
              individual OneFS SyncIQ performance rules.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: View a single SyncIQ performance rule.

       URL: GET /platform/<<version=3>>/sync/rules/<RULE>

There are no query arguments for this method.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "rules": {
      "items": {
        "type": "object", 
        "description": "A rule limiting the bandwidth, file operations, cpu usage, or worker count for all sync jobs on this cluster.", 
        "properties": {
          "description": {
            "required": true, 
            "type": "string", 
            "description": "User-entered description of this performance rule."
          }, 
          "schedule": {
            "required": true, 
            "type": [
              "object", 
              "null"
            ], 
            "description": "A schedule defining when during a week this performance rule is in effect.  If unspecified or null, the schedule will always be in effect.", 
            "properties": {
              "begin": {
                "required": false, 
                "type": [
                  "string", 
                  "null"
                ], 
                "description": "Start time (inclusive) for this schedule, during its specified days.  Format is \"hh:mm\" (24h format hour, and minute).  A null value indicates the beginning of the day (\"00:00\")."
              }, 
              "end": {
                "required": false, 
                "type": [
                  "string", 
                  "null"
                ], 
                "description": "End time (inclusive) for this schedule, during its specified days.  Format is \"hh:mm\" (three-letter weekday name abbreviation, 24h format hour, and minute).  A null value indicates the end of the day (\"23:59\")."
              }, 
              "monday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Monday.  If false, or unspecified, it is not."
              }, 
              "tuesday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Tuesday.  If false, or unspecified, it is not."
              }, 
              "friday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Friday.  If false, or unspecified, it is not."
              }, 
              "wednesday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Wednesday.  If false, or unspecified, it is not."
              }, 
              "thursday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Thursday.  If false, or unspecified, it is not."
              }, 
              "sunday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Sunday.  If false, or unspecified, it is not."
              }, 
              "saturday": {
                "required": false, 
                "type": "boolean", 
                "description": "If true, this rule is in effect on Saturday.  If false, or unspecified, it is not."
              }
            }
          }, 
          "enabled": {
            "required": true, 
            "type": "boolean", 
            "description": "Whether this performance rule is currently in effect during its specified intervals."
          }, 
          "limit": {
            "required": true, 
            "type": "integer", 
            "description": "Amount the specified system resource type is limited by this rule.  Units are kb/s for bandwidth, files/s for file-count, processing percentage used for cpu, or percentage of maximum available workers."
          }, 
          "type": {
            "enum": [
              "bandwidth", 
              "file_count", 
              "cpu", 
              "worker"
            ], 
            "type": "string", 
            "description": "The type of system resource this rule limits.", 
            "required": true
          }, 
          "id": {
            "required": true, 
            "type": "string", 
            "description": "The system ID given to this performance rule."
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method PUT: Modify a single SyncIQ performance rule.

       URL: PUT /platform/<<version=3>>/sync/rules/<RULE>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "description": "A rule limiting the bandwidth, file operations, cpu usage, or worker count for all sync jobs on this cluster.", 
  "properties": {
    "limit": {
      "type": "integer", 
      "description": "Amount the specified system resource type is limited by this rule.  Units are kb/s for bandwidth, files/s for file-count, processing percentage used for cpu, or percentage of maximum available workers."
    }, 
    "enabled": {
      "type": "boolean", 
      "description": "Whether this performance rule is currently in effect during its specified intervals."
    }, 
    "description": {
      "type": "string", 
      "description": "User-entered description of this performance rule."
    }, 
    "schedule": {
      "type": [
        "object", 
        "null"
      ], 
      "description": "A schedule defining when during a week this performance rule is in effect.  If unspecified or null, the schedule will always be in effect.", 
      "properties": {
        "begin": {
          "required": false, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "Start time (inclusive) for this schedule, during its specified days.  Format is \"hh:mm\" (24h format hour, and minute).  A null value indicates the beginning of the day (\"00:00\")."
        }, 
        "end": {
          "required": false, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "End time (inclusive) for this schedule, during its specified days.  Format is \"hh:mm\" (three-letter weekday name abbreviation, 24h format hour, and minute).  A null value indicates the end of the day (\"23:59\")."
        }, 
        "monday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Monday.  If false, or unspecified, it is not."
        }, 
        "tuesday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Tuesday.  If false, or unspecified, it is not."
        }, 
        "friday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Friday.  If false, or unspecified, it is not."
        }, 
        "wednesday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Wednesday.  If false, or unspecified, it is not."
        }, 
        "thursday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Thursday.  If false, or unspecified, it is not."
        }, 
        "sunday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Sunday.  If false, or unspecified, it is not."
        }, 
        "saturday": {
          "required": false, 
          "type": "boolean", 
          "description": "If true, this rule is in effect on Saturday.  If false, or unspecified, it is not."
        }
      }
    }
  }
}

There is no response body for this method.

********************************************************************************

Method DELETE: Delete a single SyncIQ performance rule.

          URL: DELETE /platform/<<version=3>>/sync/rules/<RULE>

There are no query arguments for this method.

There is no response body for this method.
